package com.ruoyi.sysem.service.impl;

import com.ruoyi.sysem.domain.CreditUser;
import com.ruoyi.sysem.mapper.CreditUserMapper;
import com.ruoyi.sysem.service.ICreditUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 借款用户授信资料Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-12-13
 */
@Service
public class CreditUserServiceImpl implements ICreditUserService
{
    @Autowired
    private CreditUserMapper creditUserMapper;

    /**
     * 查询借款用户授信资料
     * 
     * @param cid 借款用户授信资料主键
     * @return 借款用户授信资料
     */
    @Override
    public CreditUser selectCreditUserByCid(Long cid)
    {
        return creditUserMapper.selectCreditUserByCid(cid);
    }

    /**
     * 查询借款用户授信资料列表
     * 
     * @param creditUser 借款用户授信资料
     * @return 借款用户授信资料
     */
    @Override
    public List<CreditUser> selectCreditUserList(CreditUser creditUser)
    {
        return creditUserMapper.selectCreditUserList(creditUser);
    }

    /**
     * 新增借款用户授信资料
     * 
     * @param creditUser 借款用户授信资料
     * @return 结果
     */
    @Override
    public int insertCreditUser(CreditUser creditUser)
    {
        return creditUserMapper.insertCreditUser(creditUser);
    }

    /**
     * 修改借款用户授信资料
     * 
     * @param creditUser 借款用户授信资料
     * @return 结果
     */
    @Override
    public int updateCreditUser(CreditUser creditUser)
    {
        return creditUserMapper.updateCreditUser(creditUser);
    }

    /**
     * 批量删除借款用户授信资料
     * 
     * @param cids 需要删除的借款用户授信资料主键
     * @return 结果
     */
    @Override
    public int deleteCreditUserByCids(Long[] cids)
    {
        return creditUserMapper.deleteCreditUserByCids(cids);
    }

    /**
     * 删除借款用户授信资料信息
     * 
     * @param cid 借款用户授信资料主键
     * @return 结果
     */
    @Override
    public int deleteCreditUserByCid(Long cid)
    {
        return creditUserMapper.deleteCreditUserByCid(cid);
    }



}
